export function formatLocalTime(serverTime:Date) {
  const date = new Date(serverTime);
  
  // 日期格式化选项
  const dateOptions:any = { 
    year: 'numeric', 
    month: 'long', 
    day: 'numeric' 
  };
  
  // 时间格式化选项
  const timeOptions:any = { 
    hour: '2-digit', 
    minute: '2-digit', 
    second: '2-digit' 
  };
  
  return {
    date: date.toLocaleDateString('zh-CN', dateOptions), // "2023年9月12日"
    time: date.toLocaleTimeString('zh-CN', timeOptions), // "18:30:00"
    full: date.toLocaleString('zh-CN', { ...dateOptions, ...timeOptions })
  };
}

